<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<style type="text/css">
			body {
				height: 1000px;
			}
		</style>
	</head>

	<body>
		<div id="content">
			<p>百度就是好！</p>
			<img src="images/bd_logo1.png" />
		</div>
		<div id="container">
			<span id="">
				上一页
			</span>
			<span><a href="javascript:updateHtml()">1</a></span>
			<span><a href="">2</a></span>
			<span><a href="">3</a></span>
			<span><a href="">4</a></span>
			<span><a href="">5</a></span>
			<span><a href="">6</a></span>
			<span><a href="">7</a></span>
			<span><a href="">8</a></span>
			<span><a href="">9</a></span>
			<span><a href="javascript:updateHtml()">10</a></span>
			<span>下一页</span>
		</div>

		<script type="text/javascript">
			var str = "<p>搜狗就是棒！</p><img src='images/logo_440x140.png'>";

			setPages(2,10);


			function setPages(currentNum,countNum) {
				var btnStr = "";
				for(var i = currentNum; i < countNum; i++) {
					btnStr += "<span><a>" + i + "</a></span>"
				}
			}

			function updateHtml() {
				document.getElementById("content").innerHTML = str;
			}
		</script>
	</body>

</html>